package com.neu.flashmall.product.vo;

import com.neu.flashmall.product.entity.PmsSpuInfo;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

@Data
public class PmsSpuInfoVo {
    /**
     * 商品id
     */
    private Long id;

    /**
     * 商品名称
     */
    private String spuName;

    /**
     * 商品描述
     */
    private String spuDescription;

    /**
     * 所属分类id
     */
    private Long categoryId;
    private String categoryName;

    /**
     * 品牌id
     */
    private Long brandId;
    private String brandName;

    /**
     * 重量
     */
    private BigDecimal weight;

    /**
     * 上架状态[0 - 下架，1 - 上架]
     */
    private Integer publishStatus;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 更新时间
     */
    private Date updateTime;

    public PmsSpuInfoVo(PmsSpuInfo pmsSpuInfo){
        this.id = pmsSpuInfo.getId();
        this.spuName = pmsSpuInfo.getSpuName();
        this.spuDescription = pmsSpuInfo.getSpuDescription();
        this.categoryId = pmsSpuInfo.getCategoryId();
        this.brandId = pmsSpuInfo.getBrandId();
        this.weight = pmsSpuInfo.getWeight();
        this.publishStatus = pmsSpuInfo.getPublishStatus();
        this.createTime = pmsSpuInfo.getCreateTime();
        this.updateTime = pmsSpuInfo.getUpdateTime();
    }
}
